home *** CD-ROM | disk | FTP | other *** search
- Path: castle.nando.net!news
- From: actuary@nando.net (Bill McCarthy)
- Newsgroups: comp.lang.c
- Subject: Re: *** Need help ASAP *** CLS, LOCATE, etc do not work with Borland 3.1 for dos
- Date: 2 Mar 1996 18:11:05 GMT
- Organization: Nando.net Public Access
- Message-ID: <4ha2vp$6a8@castle.nando.net>
- References: <4h96ne$3nb@fountain.mindlink.net>
- Reply-To: actuary@nando.net (Bill McCarthy)
- NNTP-Posting-Host: vyger117.nando.net
- X-Newsreader: IBM NewsReader/2 v1.2
-
- In <4h96ne$3nb@fountain.mindlink.net>, mike_huwe@mindlink.bc.ca (Mike Huwe) writes:
- >I am using Borland C++ 3.1. When I run simple programs that clear the
- >screen or use the LOCATE command, they don't work. for example,
- >When I run a program the output stays at the top of the screen. When I run
- >the program again the new output is shown below the old output.
- >
- >If I use the LOCATE macro, the statements are printed below
- >each other rather than at the specified cursor location.
- >
- >Does anyone know what the problem is?
- >
- >Please e-mail me with your responses. Thanks in advance.
- >
- >Mike
- >
- >I used the following:
- >
- >#define CLS printf("\033[2j")
- >#define LOCATE(r,c) printf("\033[%d;%dH",r,c)
-
- The CLS macro should use "J" instead of "j" and make sure ansi video
- support is loaded.
-
- Also, there are Borland functions to do these things (see conio.h).
- However, the macro approach works with other compilers and work
- in DOS and dos shells like Windows. Once you buy your first 32 bit
- computer, it will also work with OS/2 or WinNT.
-
- Bill McCarthy
- actuary@nando.net
- Wendell, NC USA
-
-